<!-- BEGIN: center-->
<script language="javascript" type="text/javascript">
function checkempty($obj,$msg){
	if($obj.value==""){
		alert("Please, input "+$msg);
		$obj.focus();
		return false;
	}
	else{
		return true;
	}
}
function compare($obj1,$obj2,$msg){
	if($obj1.value==$obj2.value){
		return true;
	}
	else{
		alert($msg);
		$obj1.focus();
		return false
	}
}
function validateEmail(email){
	var re_mail = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z])+$/;
	if (!re_mail.test(email.value)) {
		return false;
	}
	return true;
}
function checksubmit(){
	if(checkempty(document.frmContact.txtfirstname,"First Name"))
		if(checkempty(document.frmContact.txtlastname,"Last Name"))
			if(checkempty(document.frmContact.txtdes,"Description"))
				if(checkempty(document.frmContact.txtphone,"Phone Number"))
					if(validateEmail(document.frmContact.txtemail)){
						document.frmContact.submit();
					}
					else{
						alert('Invalid email address supplied. Please re-check your email address.');
					}
}
</script>

<table width="100%" border="0" cellspacing="0" cellpadding="0" style="padding-top:5px">
  <tr>
  	<td>&nbsp;</td>
	<td class="bottom_bar">{save_button}</td>
	<td class="bottom_bar">{cancel_button}</td>
  </tr>
</table>
<br />
<form action="" method="post" name="frmAddnews" enctype="multipart/form-data">
<input type="hidden" name="type" value="{write.type}" />
<input type="hidden" name="id" value="{write.id}" />
	<table width="100%" border="0" cellspacing="0" cellpadding="2">
	  <tr>
		<td align="center" valign="top">
			<table width="100%" border="0" cellspacing="0" cellpadding="3">
              <tr> 
                <td> First Name</td>
                <td style="padding-bottom:3px"><input name="txtfirstname" type="text" maxlength="100" size="30" class="textred" value="{write.bc_firstname}" /></td>
              </tr>
              <tr> 
                <td> Last Name</td>
                <td style="padding-bottom:3px"><input name="txtlastname" type="text" maxlength="100" size="30" class="textred" value="{write.bc_lastname}" /></td>
              </tr>                              
              <tr> 
                <td>Email</td>
                <td style="padding-bottom:3px"><input name="txtemail" type="text" maxlength="100" size="30" class="textred" value="{write.bc_mail}" /></td>
              </tr>
              <tr> 
                <td>Address</td>
                <td style="padding-bottom:3px"><input name="txtaddress" type="text" maxlength="100" size="50" class="textred" value="{write.bc_address}" /></td>
              </tr>
              <tr> 
                <td>Phone Number</td>
                <td style="padding-bottom:3px"><input name="txtphone" type="text" maxlength="100" size="15" class="textred" value="{write.bc_phone}" /></td>
              </tr>
              <tr> 
                <td >Brief description</td>
                <td style="padding-bottom:3px"><?php $_FCKeditor->Create();?></td>
              </tr>
              <tr>
              	<td>Time</td>
                <td style="padding-bottom:3px"><input type="text" value="{write.bc_datetime}" readonly="readonly" /></td>
              </tr>
			</table>
		</td>	
	  </tr>
	</table>
</form>
<!-- END: center-->
